'''
Created on 2010-04-28

@author: Antoni Kdracki
'''

import LightSnake
import time
import settings

if __name__ == '__main__':
    serial_device =  settings.SERIAL_DEVICE
    serial_speed  =  settings.SERIAL_SPEED
    debug         =  settings.DEBUG
    light = LightSnake.LightSnake(serial_device, serial_speed, debug=debug)

    time.sleep(2)
    while 1:
        for i in range(0, 96, 3):
            light.set(i + 2, 0)
            time.sleep(0.05)
            light.set(i, 255)
            time.sleep(0.05)
        
        for i in range(0, 96, 3):
            light.set(i, 0)
            time.sleep(0.05)
            light.set(i + 1, 255)
            time.sleep(0.05)
            
        for i in range(0, 96, 3):
            light.set(i + 1, 0)
            time.sleep(0.05)
            light.set(i + 2, 255)
            time.sleep(0.05)
            
    
        
